//---------------------------------------------------------------------------
#ifndef CDBLklbH
#define CDBLklbH
//---------------------------------------------------------------------------
#include "CtrlDB.h"
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <DBCtrls.hpp>
//---------------------------------------------------------------------------
class PACKAGE_CTRLDB CDBLookupListBox : public TDBLookupListBox
{
private:
  AnsiString    m_asRefWebHelp;
  bool          m_Enabled;
  bool          m_ReadOnly;
  TColor        m_Color;
  TFont *       m_Font;

  void __fastcall SetRefWebHelp(const AnsiString asValeur) { m_asRefWebHelp = asValeur;};
  void __fastcall SetEnabled     (bool   value);
  void __fastcall SetReadOnly    (bool   value);
  void __fastcall SetColor       (TColor value);
  void __fastcall SetFont        (TFont *value);

  void __fastcall EvOnChange (TObject *Sender);

protected:
  void __fastcall WMPaint(TWMPaint &Msg);
  BEGIN_MESSAGE_MAP
   MESSAGE_HANDLER(WM_PAINT, TWMPaint, WMPaint)
  END_MESSAGE_MAP(TDBLookupListBox)

public:
  __fastcall  CDBLookupListBox(TComponent* Owner);
  virtual __fastcall ~CDBLookupListBox(void);
__published:
  __property AnsiString  RefWebHelp   = {read = m_asRefWebHelp, write = SetRefWebHelp};
  __property TColor Color        = { read=m_Color       , write=SetColor       , default=clWindow };
  __property bool   Enabled      = { read=m_Enabled     , write=SetEnabled     , default=true     };
  __property TFont *Font         = { read=m_Font        , write=SetFont                           };
  __property bool   ReadOnly     = { read=m_ReadOnly    , write=SetReadOnly    , default=false    };
};
//---------------------------------------------------------------------------
#endif
